<?php

namespace App\Http\Requests\Admin\Panx\Device;

use App\Http\Requests\ApiRequest;

/**
 * @property string uuid
 * @property string device_name
 * @property string specification
 * @property string producer
 * @property string operator
 * @property string customer_id
 * @property array time_range
 * @property array order_bys
 * @property mixed device_code
 */
class DeviceSellListRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'device_code'   => 'nullable|string',
            'device_name'   => 'nullable|string',
            'specification' => 'nullable|string',
            'producer'      => 'nullable|string',
            'operator'      => 'nullable|string',
            'customer_id'   => 'nullable|int|min:1',
            'time_range'    => 'nullable|array',
            'order_bys'     => 'nullable|array'
        ];
    }
}
